<?php

class App_View_Helper_FlashMessenger extends Zend_View_Helper_Abstract
{

	/**
	 *
	 * @return string 
	 */
	public function flashMessenger()
	{
		$messages = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger')->getMessages();

		if (count($messages) == 0)
			return '';

		return $this->view->partial('messages.phtml', array('messages' => $messages));
	}

}